﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Globalization;
using SecureCookie.Implementation.Helper;

namespace SecureCookie.Implementation.Hook.Impl
{
    class DebugTraceLogger : ILogger
    {
        public void LogVerbose(Func<string> message, Func<object[]> args)
        {
            Debug.WriteLine(string.Format(CultureInfo.InvariantCulture, message(), args()), SecureCookieSettings.Default.TracingCategory);
        }

        public void LogException(Exception exception)
        {
            Debug.WriteLine(string.Format(CultureInfo.InvariantCulture, "An exception was throw {0}", exception.RepresentAsStringRecursively()), SecureCookieSettings.Default.TracingCategory);
        }
    }
}
